package com.zhijian.warehouse.manage.dao;

import com.zhijian.warehouse.manage.entity.po.StoreStockRecordProduct;
import com.zhijian.warehouse.manage.entity.vo.request.StoreStockRecordProductSearchVo;
import com.zhijian.warehouse.manage.entity.vo.response.StoreStockRecordProductVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface StoreStockRecordProductMapper {
    int deleteByPrimaryKey(Long id);

    int insert(StoreStockRecordProduct record);

    int insertSelective(StoreStockRecordProduct record);

    StoreStockRecordProduct selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(StoreStockRecordProduct record);

    int updateByPrimaryKey(StoreStockRecordProduct record);

    /**
     * 查询总数
     *
     * @param storeStockRecordProductSearchVo
     * @return
     */
    int count(StoreStockRecordProductSearchVo storeStockRecordProductSearchVo);

    /**
     * 查询列表
     *
     * @param storeStockRecordProductSearchVo
     * @return
     */
    List<StoreStockRecordProductVo> selectList(StoreStockRecordProductSearchVo storeStockRecordProductSearchVo);

    /**
     * 查询单个
     *
     * @param storeStockRecordProductSearchVo
     * @return
     */
    StoreStockRecordProductVo selectOne(StoreStockRecordProductSearchVo storeStockRecordProductSearchVo);

    /**
     * 根据ID查询vo
     *
     * @param id
     * @return
     */
    StoreStockRecordProductVo selectVoById(Long id);

    /**
     * 批量删除
     *
     * @param idList
     * @return
     */
    void deleteByIdList(@Param("idList") List<Long> idList);

    /**
     * 动态删除
     *
     * @param storeStockRecordProductSearchVo
     * @return
     */
    void deleteByCondition(StoreStockRecordProductSearchVo storeStockRecordProductSearchVo);

    /**
     * 批量新增
     *
     * @param entities
     * @return
     */
    int insertBatch(@Param("entities") List<StoreStockRecordProduct> entities);

    /**
     * 根据StoreStockRecordId查询列表
     *
     * @param storeStockRecordId
     * @return
     */
    List<StoreStockRecordProductVo> selectListByStoreStockRecordId(Long storeStockRecordId);

    /**
     * 根据ProductId查询列表
     *
     * @param productId
     * @return
     */
    List<StoreStockRecordProductVo> selectListByProductId(Long productId);

    /**
     * 根据WarehouseId查询列表
     *
     * @param warehouseId
     * @return
     */
    List<StoreStockRecordProductVo> selectListByWarehouseId(Long warehouseId);

    /**
     * 根据StoreStockRecordId和ProductId查询列表
     *
     * @param saveOrUpdateVo
     * @return
     */
    int insertSelectiveByVO(StoreStockRecordProductVo saveOrUpdateVo);
}